function faqsubmit(oform) {
	faqurl = oform.action;
	var check_validate_code_response = function(oXML) {
		if(oXML == 'ok') {
			var faq_response = function(oXML) {
				if(oXML == 'ok') {
					// 提交问题成功
					oform.elements['faq_subject'].value = '';
					/*oform.elements['faq_email_to_sender'].checked = false;*/
					oform.elements['faq_content'].value = '';
					oform.elements['faq_sender'].value = '';
					oform.elements['faq_sender_email'].value = '';
					$('#validate_img').click();
					$('#validate_code').attr({ value: ''});
					alert('提问成功！请等待我们的回复，谢谢！');
				} else {
				}
			}

			var subject = oform.elements['faq_subject'].value;
			var cid     = oform.elements['faq_cid'].value;
			var sender  = oform.elements['faq_sender'].value;
			var sender_email = oform.elements['faq_sender_email'].value;
			/*var email_to_sender = oform.elements['faq_email_to_sender'].checked;*/
			var content = oform.elements['faq_content'].value;
			var cata_id = oform.elements['faq_cata_id'].value;

			
			if(subject == '') {
				alert('咨询主题不能为空！');
				oform.elements['faq_subject'].focus();
				return false;
			}

			if(content == '') {
				alert('咨询内容不能为空！');
				oform.elements['faq_content'].focus();
				return false;
			}
			email_to_sender = 0;
			/*email_to_sender = email_to_sender ? 1 : 0;*/
			cid = parseInt(cid);
			cata_id = parseInt(cata_id);
			if(isNaN(cata_id)) {alert('无法提交咨询，请联系管理员！');return false;}
			if(isNaN(cid)) cid = cata_id;

			param = '&cid=' + cid + '&cata_id=' + cata_id;
			param += '&sender=' + sender + '&sender_email=' + sender_email + '&email_to_sender' + email_to_sender;
			param += '&subject=' + subject + '&content=' + content + '&';
			url = faqurl + '?action=add';
			$.post(url, param, faq_response);

		} else {
			alert('验证码错误！');
			$('#validate_img').click();
			$('#validate_code').attr({ value: ''});
		}
	}


	
	code = oform.elements['faq_validate_code'].value;
	url = faqurl + '?action=query&code=' + code + '&front=1';
	var param = '';
	$.post(url, param, check_validate_code_response);
	return false;
}